package com.ss.android.common.imagezoom;

import android.graphics.RectF;

import com.ss.android.common.imagezoom.easing.Cubic;

final class c implements Runnable {
    private final ImageViewTouchBase g;
    private final int c;
    private final long d;
    private final double e;
    private final double f;
    private double a;
    private double b;

    c(ImageViewTouchBase arg5, long arg6, double arg8, double arg10) {
        this.g = arg5;
        this.c = 300;
        this.d = arg6;
        this.e = arg8;
        this.f = arg10;

        this.a = 0;
        this.b = 0;
    }

    public final void run() {
        double v0 = Math.min(this.c, ((double)(System.currentTimeMillis() - this.d)));
        double v6 = Cubic.easeOut(v0, this.e, this.c);
        double v2 = Cubic.easeOut(v0, this.f, this.c);
        this.g.a(v6 - this.a, v2 - this.b);
        this.a = v6;
        this.b = v2;
        if(v0 < this.c) {
            this.g.j.post(((Runnable)this));
        }
        else {
            RectF v0_1 = this.g.a(this.g.i);
            if(v0_1.left == 0f && v0_1.top == 0f) {
                return;
            }

            this.g.c(v0_1.left, v0_1.top);
        }
    }
}

